package org.mzx.shortLink.adminn.remoteApi.workkApi;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mzx.shortLink.adminn.remoteApi.dto.Request.ShortLinkGroupStatsAccessRecordReqDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Request.ShortLinkGroupStatsReqDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Request.ShortLinkStatsAccessRecordReqDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Request.ShortLinkStatsReqDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Response.ShortLinkStatsAccessRecordRespDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Response.ShortLinkStatsRespDTO;
import org.mzx.shortLink.starter.convention.Result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author mazhenxi
 * @date 2025/5/8
 */
@ComponentScan
@FeignClient(name = "short-link-wrok",contextId = "linkStats")
public interface feignTLinkStats {

    /**
     * 访问单个短链接的访问数据
     * @param requestParam
     * @return
     */
    @GetMapping("/api/short-link/v1/stats")
    Result<ShortLinkStatsRespDTO> shortLinkStats(@RequestBody ShortLinkStatsReqDTO requestParam);

    /**
     * 访问分组短链接指定时间内监控数据
     * @param requestParam
     * @return
     */
    @GetMapping("/api/short-link/v1/stats/group")
    public Result<ShortLinkStatsRespDTO> groupShortLinkStats(@RequestBody ShortLinkGroupStatsReqDTO requestParam);

    /**
     * 分页查询单个短链接单位时间内访问记录
     */

    /**
     * 分页查询单个短链接单位时间内访问记录
     * @param requestParam
     * @return
     */
    @GetMapping("/api/short-link/v1/stats/access-record")
    Result<IPage<ShortLinkStatsAccessRecordRespDTO>> shortLinkStatsAccessRecord(@RequestBody ShortLinkStatsAccessRecordReqDTO requestParam);

    /**
     * 访问分组短链接指定时间内访问记录监控数据
     * @param requestParam
     * @return
     */
    @GetMapping("/api/short-link/v1/stats/access-record/group")
    Result<IPage<ShortLinkStatsAccessRecordRespDTO>> groupShortLinkStatsAccessRecord(@RequestBody ShortLinkGroupStatsAccessRecordReqDTO requestParam);
}
